<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>商铺信息管理</title>
    <script src="../js/vue.js" type="text/javascript"></script>
    <script src="../js/jquery-1.12.4.js" type="text/javascript"></script>
    <script src="../js/axios.min.js" type="text/javascript"></script>
    <link href="../css/merchant.css" type="text/css" rel="stylesheet"/>
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<body>
<div id="app">
    <el-input v-model="condition" placeholder="请店铺名称或联系人姓名"></el-input>

    <el-button type="primary" @click="findByCondition">搜索</el-button>



    <el-table
            :data="storeList.list"
            style="width: 1500px">
        <el-table-column
                prop="storeInfoName"
                label="商铺名称"
                width="200"
                align="center">
        </el-table-column>
        <el-table-column
                prop="storeInfoAddress"
                label="地址"
                width="150"
                align="center">
        </el-table-column>
        <el-table-column
                prop="storeInfoLinkMan"
                label="联系人"
                width="150"
                align="center">
        </el-table-column>
        <el-table-column
                prop="storeInfoPhone"
                label="联系电话"
                width="150"
                align="center">
        </el-table-column>
        <el-table-column
                prop="storeInfoStatusName"
                label="店铺状态"
                width="80"
                align="center">
        </el-table-column>
        <el-table-column
                prop="storeInfoStoreStatusName"
                label="营业状态"
                width="80"
                align="center">
        </el-table-column>
        <el-table-column
                prop="storeInfoRemarks"
                label="备注"
                width="80"
                align="center">
        </el-table-column>

        <el-table-column
                label="操作"
                width="200"
                align="center">
            <template slot-scope="scope">
                <el-button @click="viewDetail(scope.row)" type="text" size="small">查看详情</el-button>
            </template>
        </el-table-column>
    </el-table>


    <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="storeList.pageIndex"
            :page-sizes="[3, 5, 8, 10]"
            :page-size="storeList.pageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="storeList.total">
    </el-pagination>

    <el-dialog
            title="商铺详情"
            :visible.sync="showDetailWindow"
            width="80%"
            :before-close="handleClose">
        <h3>Logo:</h3>
        <el-image style="width: 100px; height: 100px" :src="storeDetail.storeInfo.storeInfoLogo" ></el-image>
        <el-descriptions title="详细信息" border>
            <el-descriptions-item label="商铺名称">{{storeDetail.storeInfo.storeInfoName}}</el-descriptions-item>
            <el-descriptions-item label="地址">{{storeDetail.storeInfo.storeInfoAddress}}</el-descriptions-item>
            <el-descriptions-item label="联系人">{{storeDetail.storeInfo.storeInfoLinkMan}}</el-descriptions-item>
            <el-descriptions-item label="联系电话">{{storeDetail.storeInfo.storeInfoPhone}}</el-descriptions-item>
            <el-descriptions-item label="订餐电话">{{storeDetail.storeInfo.storeInfoOrderPhone}}</el-descriptions-item>
            <el-descriptions-item label="起送价">{{storeDetail.storeInfo.storeInfoInitiatePrice}}</el-descriptions-item>
            <el-descriptions-item label="配送费">{{storeDetail.storeInfo.storeInfoDphPrice}}</el-descriptions-item>
            <el-descriptions-item label="商家公告">{{storeDetail.storeInfo.storeInfoAffiche}}</el-descriptions-item>
            <el-descriptions-item label="友情提示">{{storeDetail.storeInfo.storeInfoNotice}}</el-descriptions-item>
            <el-descriptions-item label="配送服务">{{storeDetail.storeInfo.storeInfoDispatching}}</el-descriptions-item>
            <el-descriptions-item label="营业执照">{{storeDetail.storeInfo.storeInfoLicense}}</el-descriptions-item>
            <el-descriptions-item label="餐饮许可证">{{storeDetail.storeInfo.storeInfoPermit}}</el-descriptions-item>
            <el-descriptions-item label="商铺评分">{{storeDetail.storeInfo.storeInfoStoreScore}}</el-descriptions-item>
            <el-descriptions-item label="菜品评分">{{storeDetail.storeInfo.storeInfoDishesScore}}</el-descriptions-item>
            <el-descriptions-item label="配送评分">{{storeDetail.storeInfo.storeInfoDphScore}}</el-descriptions-item>
            <el-descriptions-item label="评价时间">{{storeDetail.storeInfo.storeInfoEvaluateDate}}</el-descriptions-item>
            <el-descriptions-item label="商铺简介">{{storeDetail.storeInfo.storeInfoStoreIntro}}</el-descriptions-item>
            <el-descriptions-item label="创建人">{{storeDetail.storeInfo.storeInfoCreateUser}}</el-descriptions-item>
            <el-descriptions-item label="创建日期">{{storeDetail.storeInfo.storeInfoCreateDate}}</el-descriptions-item>
            <el-descriptions-item label="更新人">{{storeDetail.storeInfo.storeInfoUpdateUser}}</el-descriptions-item>
            <el-descriptions-item label="更新日期">{{storeDetail.storeInfo.storeInfoUpdateDate}}</el-descriptions-item>
            <el-descriptions-item label="备注">{{storeDetail.storeInfo.storeInfoRemarks}}</el-descriptions-item>
        </el-descriptions>

        <h3>附件：</h3>
        <el-image v-for="x in storeDetail.attachments" :key="x.storeAttachmentFilePath" :src="x.storeAttachmentFilePath"></el-image>


        <h3>用餐时间表</h3>
        <div v-for="sd in storeDetail.dietTimeConfigs">{{sd.dietTimeConfigDietName}}{{sd.dietTimeConfigStartTime}}---{{sd.dietTimeConfigEndTime}}</div>

        <h4>菜品月销量</h4>
        <div v-for="fd in storeDetail.foodInfoDtos">名字:{{fd.foodInfoFoodName}}价格:{{fd.foodInfoPrice}}月销量:{{fd.foodMonthSaleCount}}</div>









        <span slot="footer" class="dialog-footer">
         <el-button type="primary" v-if="storeDetail.storeInfo.storeInfoStatus==0" @click="success(storeDetail.storeInfo.storeInfoId)">激活</el-button>
            <el-button type="danger" v-if="storeDetail.storeInfo.storeInfoStatus==1" @click="freeze(storeDetail.storeInfo.storeInfoId)">冻结</el-button>
        <el-button @click=" showDetailWindow = false">取 消</el-button>
        </span>
    </el-dialog>






</div>
<script src="../js/merchant.js" type="text/javascript"></script>
</body>
</html>